#include <iostream>

#define MAXSIZE 10

//循环队列
typedef struct 
{
    int data[MAXSIZE];
    int rear;
    int front;
}SqQueue;

void initQueue(SqQueue &);  //初始化队列
int isQueueEmpty(SqQueue);  //判断队空代码
int enQueue(SqQueue&,int);  //进队代码
int deQueue(SqQueue&,int&); //出队代码


using namespace std;
int main(void)
{

    cout << "finish" << endl;
    return 0;
}

//初始化队列
void initQueue(SqQueue &qs)
{
    qs.front = qs.front = 0;    //队首队尾重合并且指向0
}

//对列判空
int isQueueEmtpy(SqQueue qs)
{
    if(qs.front == qs.rear) //只要队首队尾重合，对列必空
        return 1;   
    else 
        return 0;
}

//入队
int enQueue(SqQueue &qs, int x)
{
    if((qs.rear+1) == MAXSIZE)
        return 0;
    qs.rear = (qs.rear + 1) % MAXSIZE;
}

//出队
int deQueue(SqQueue &qs, int &x)
{
    if(qs.front == qs.rear)
        return 0;
    qs.front = (qs.front + 1) % MAXSIZE;
    x = qs.data[qs.front];
    return 1;
}